home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / Small Eiffel 0.4.8 / misc / pretty_test < prev    next >
Text File  |  1997-01-03  |  1KB  |  67 lines

  1. #!/bin/csh
  2. # pretty_test ... to test command "pretty"
  3. #
  4. #set verbose = 1
  5. set usage = "Usage: pretty_test [compiler]"
  6. echo -n "Testing pretty ."
  7. cd ${SmallEiffel}/bin
  8. /bin/rm -fr pretty_test_tmp
  9. echo -n "."
  10. mkdir pretty_test_tmp
  11. echo -n "."
  12. cd pretty_test_tmp
  13. echo -n "."
  14. cp ../../lib_se/*.e .
  15. echo -n "."
  16. cp ../../lib_std/*.e .
  17. echo -n "."
  18. foreach flag (-default -zen -end -parano)
  19.     echo -n "."
  20.     echo -n "."
  21.     foreach file (*.e)
  22.         ../pretty ${flag} ${file}
  23.         if ($status) then
  24.                 echo "Bad pretty_test (step 1)."
  25.                 echo flag is ${flag}
  26.                exit 1
  27.         endif
  28.         echo -n "."
  29.         cp ${file} ${file}.step1.${flag}
  30.     end
  31.     echo -n "."
  32.     foreach file (*.e)
  33.         ../pretty ${flag} ${file}
  34.         if ($status) then
  35.             echo "Bad pretty_test (step 2)."
  36.             echo flag is ${flag}
  37.             exit 1
  38.         endif
  39.         diff ${file} ${file}.step1.${flag}
  40.         if ($status) then
  41.             echo File ${file} is changing with ${flag}
  42.             exit 1
  43.         endif
  44.     echo -n "."
  45.     end
  46.     echo -n "."
  47.     ../pretty ${flag} *.e
  48.     if ($status) then
  49.         echo "Bad pretty_test (step 3)."
  50.         echo flag is ${flag}
  51.         exit 1
  52.     endif
  53.     echo "."
  54.     /bin/rm -f pretty
  55.     echo "."
  56.     ../compile_to_c -boost pretty make
  57.     ../compile_to_c compile make
  58.     ../compile_to_c compile_to_c make
  59.     ../pretty ${flag} *.e
  60.     if ($status) then
  61.         echo flag is ${flag}
  62.         echo "Bad pretty_test (step 4)."
  63.         exit 1
  64.     endif
  65. end
  66. echo "pretty_test DONE." 
  67.